import Taro, { Component } from '@tarojs/taro'
import { View } from '@tarojs/components'
import classNames from 'classnames'
import styles from '../index.module.scss'
import { GoodsFiveItem } from '@/components/index'

interface IProps {
  list: any
  className?: string
}

export default class GoodsFiveList extends Component<IProps, {}> {
  props: any

  static options = {
    addGlobalClass: true
  }

  render() {
    const { list=[], className } = this.props
    return !!list.length && (
      <View className={classNames(styles['goods-list'], className)}>
        {
          list.map(goods => {
            return (<GoodsFiveItem key={goods.id} info={goods}/>)
          })
        }
      </View>
    )
  }
}
